<template>
    <p>这是一个父组件</p>
    <p>{{ msg }}</p>
    <ChildCom ：parentMsg="msg"  @changeParentInfo="getChildMsg" />
    
</template>

<script>
import ChildCom from './ChildCom.vue'
    export default{
        name:"ParentCom",
        components:{
                ChildCom
            
        },
        data(){
            return{
                msg:"父组件:123"
            }
        },
        methods:{
            getChildMsg(info){
                console.log('info',info);
                this.msg=info
            }
        }
    }
</script>